﻿@{
    ViewData["Title"] = "Create";
}


<form class="layui-form" action="" style="width:95%" lay-filter="form-create">
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="required|title" autocomplete="off" placeholder="请输入名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">起始url</label>
        <div class="layui-input-block">
            <input type="text" name="startUrl" lay-verify="required|title" autocomplete="off" placeholder="请输入起始url" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">指定域</label>
        <div class="layui-input-block">
            <input type="text" name="filterHost" lay-verify="required|title" autocomplete="off" placeholder="请输入指定域" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">

        <div class="layui-inline">
            <label class="layui-form-label">编码</label>
            <div class="layui-input-block">
                <input type="text" name="encoding" lay-verify="required|title" autocomplete="off" placeholder="请输入编码：utf8,utf16,..." class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">采集深度</label>
            <div class="layui-input-block">
                <input type="text" name="depth" lay-verify="required|number" autocomplete="off" placeholder="请输入采集深度" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">

        <div class="layui-inline layui-hide">
            <label class="layui-form-label">解析器类型</label>
            <div class="layui-input-block" style="width:186px;">
                <select name="analyzeType">
                    <option value="1">自定义</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">解析器</label>
            <div class="layui-input-block"  style="width:186px;">
                <select name="pluginPath">
                    @foreach (var item in ViewBag.Analyzers)
                    {
                        <option value="@item.FullName">@item.Name</option>
                    }
                </select>
            </div>
        </div>
    </div>

    <div class="layui-form-item">

        <div class="layui-inline">
            <label class="layui-form-label">配置状态</label>
            <div class="layui-input-block" style="width:186px;">
                <select name="collectorStatus">
                    <option value="1">可用</option>
                    <option value="0">不可用</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">工作状态</label>
            <div class="layui-input-block" style="width:186px;">
                <select name="workStatus">
                    <option value="0">待采集</option>
                    @*<option value="1">采集中</option>
                    <option value="2">停止</option>*@
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="submit" id="submit" value="确认">
    </div>
    @Html.AntiForgeryToken()
</form>
@section Scripts{
    <script>
        layui.use(['form'], function () {
            var form = layui.form;
            var $ = layui.jquery
        });
    </script>
}
